#ifndef PROBLEM_H
#define PROBLEM_H

#include <cstdlib>
#include "NotFound.h"
#include "NotReady.h"

class Instance;
class Solution;
class Objective;
class Model;

class Problem {
protected:
	Instance	*inst;
	Objective	*objective;
	
public:
	Problem();
	virtual ~Problem();

	virtual const char* getName() = 0;

	virtual Instance* newInstance( const char *name ) throw (NotFound) = 0;
	virtual Solution* newSolution() throw (NotReady) = 0;
	virtual Model* newModel() throw (NotReady) = 0;

	double evaluate( Solution *sol ) throw (NotReady);

	Instance* getInstance()		{ return inst; }
	Objective* getObjective()	{ return objective; }
};

#endif